package cn.wolfcode.car.business.web.controller;

import cn.wolfcode.car.business.domain.Department;
import cn.wolfcode.car.business.domain.Employee;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

@Controller
public class DateTimeController {

    @RequestMapping("/dateTime")
    public String dateTime(@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date, Model model){
        System.out.println(date);
        model.addAttribute("date",date);
        return "dateTime";
    }
}
